﻿ 
namespace SuperMarieApi.Log.LogAgent.LogAgent
{
    using System;

    public interface ILog
    {
        bool Enable { get; }
        int FrameIndex { get; set; }
        bool IsLogStackTrace { get; }
        bool IsTraceEnabled { get; }
        bool IsDebugEnabled { get; }
        bool IsInfoEnabled { get; }
        bool IsWarnEnabled { get; }
        bool IsErrorEnabled { get; }
        bool IsFatalEnabled { get; }
        void Trace(object message);
        void Trace(object message, Exception exception);
        void TraceFormat(string format, params object[] args);
        void TraceFormat(string format, object arg0);
        void TraceFormat(string format, object arg0, object arg1);
        void TraceFormat(string format, object arg0, object arg1, object arg2);
        void TraceFormat(IFormatProvider provider, string format, params object[] args);
        void Debug(object message);
        void Debug(object message, Exception exception);
        void DebugFormat(string format, params object[] args);
        void DebugFormat(string format, object arg0);
        void DebugFormat(string format, object arg0, object arg1);
        void DebugFormat(string format, object arg0, object arg1, object arg2);
        void DebugFormat(IFormatProvider provider, string format, params object[] args);
        void Info(object message);
        void Info(object message, Exception exception);
        void InfoFormat(string format, params object[] args);
        void InfoFormat(string format, object arg0);
        void InfoFormat(string format, object arg0, object arg1);
        void InfoFormat(string format, object arg0, object arg1, object arg2);
        void InfoFormat(IFormatProvider provider, string format, params object[] args);
        void Warn(object message);
        void Warn(object message, Exception exception);
        void WarnFormat(string format, params object[] args);
        void WarnFormat(string format, object arg0);
        void WarnFormat(string format, object arg0, object arg1);
        void WarnFormat(string format, object arg0, object arg1, object arg2);
        void WarnFormat(IFormatProvider provider, string format, params object[] args);
        void Error(object message);
        void Error(object message, Exception exception);
        void ErrorFormat(string format, params object[] args);
        void ErrorFormat(string format, object arg0);
        void ErrorFormat(string format, object arg0, object arg1);
        void ErrorFormat(string format, object arg0, object arg1, object arg2);
        void ErrorFormat(IFormatProvider provider, string format, params object[] args);
        void Fatal(object message);
        void Fatal(object message, Exception exception);
        void FatalFormat(string format, params object[] args);
        void FatalFormat(string format, object arg0);
        void FatalFormat(string format, object arg0, object arg1);
        void FatalFormat(string format, object arg0, object arg1, object arg2);
        void FatalFormat(IFormatProvider provider, string format, params object[] args);
        void Print(object message);
    }

    internal class NoLog : ILog
    {
        #region ILog 成员
        public bool Enable { get { return true; } }
        public int FrameIndex { get; set; }
        public bool IsLogStackTrace { get { return false; } }
        public bool IsTraceEnabled { get { return false; } }
        public bool IsDebugEnabled { get { return false; } }
        public bool IsInfoEnabled { get { return false; } }
        public bool IsWarnEnabled { get { return false; } }
        public bool IsErrorEnabled { get { return false; } }
        public bool IsFatalEnabled { get { return false; } }
        public void Trace(object message) { }
        public void Trace(object message, Exception exception) { }
        public void TraceFormat(string format, params object[] args) { }
        public void TraceFormat(string format, object arg0) { }
        public void TraceFormat(string format, object arg0, object arg1) { }
        public void TraceFormat(string format, object arg0, object arg1, object arg2) { }
        public void TraceFormat(IFormatProvider provider, string format, params object[] args) { }
        public void Debug(object message) { }
        public void Debug(object message, Exception exception) { }
        public void DebugFormat(string format, params object[] args) { }
        public void DebugFormat(string format, object arg0) { }
        public void DebugFormat(string format, object arg0, object arg1) { }
        public void DebugFormat(string format, object arg0, object arg1, object arg2) { }
        public void DebugFormat(IFormatProvider provider, string format, params object[] args) { }
        public void Info(object message) { }
        public void Info(object message, Exception exception) { }
        public void InfoFormat(string format, params object[] args) { }
        public void InfoFormat(string format, object arg0) { }
        public void InfoFormat(string format, object arg0, object arg1) { }
        public void InfoFormat(string format, object arg0, object arg1, object arg2) { }
        public void InfoFormat(IFormatProvider provider, string format, params object[] args) { }
        public void Warn(object message) { }
        public void Warn(object message, Exception exception) { }
        public void WarnFormat(string format, params object[] args) { }
        public void WarnFormat(string format, object arg0) { }
        public void WarnFormat(string format, object arg0, object arg1) { }
        public void WarnFormat(string format, object arg0, object arg1, object arg2) { }
        public void WarnFormat(IFormatProvider provider, string format, params object[] args) { }
        public void Error(object message) { }
        public void Error(object message, Exception exception) { }
        public void ErrorFormat(string format, params object[] args) { }
        public void ErrorFormat(string format, object arg0) { }
        public void ErrorFormat(string format, object arg0, object arg1) { }
        public void ErrorFormat(string format, object arg0, object arg1, object arg2) { }
        public void ErrorFormat(IFormatProvider provider, string format, params object[] args) { }
        public void Fatal(object message) { }
        public void Fatal(object message, Exception exception) { }
        public void FatalFormat(string format, params object[] args) { }
        public void FatalFormat(string format, object arg0) { }
        public void FatalFormat(string format, object arg0, object arg1) { }
        public void FatalFormat(string format, object arg0, object arg1, object arg2) { }
        public void FatalFormat(IFormatProvider provider, string format, params object[] args) { }
        public void Print(object message) { }
        #endregion
    }
}

